/* 
 * File:   Utils.h
 * Author: sgk
 *
 * Created on March 22, 2010, 12:41 AM
 */

#ifndef _UTILS_H
#define	_UTILS_H
#include <iostream>
using namespace std;

class Utils {
public:
    Utils();
    Utils(const Utils& orig);
    virtual ~Utils();

    static float htonf(float value);
    static void floatToBytes(float value, char* buffer);
    static void intToBytes(int value, char* buffer);
    static void fixedStringToBytes(string value, char* buffer);
    static void StringToBytes(string value, char* buffer);

    static int calcStringLength(int length);

    static bool isDroppedPacket(double packetLossRate);

private:

};

#endif	/* _UTILS_H */

